package com.ggggeeennn.home.service.Impl;

import com.ggggeeennn.home.domain.Statist;
import com.ggggeeennn.home.mapper.HomeMapper;
import com.ggggeeennn.home.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HomeServiceImpl implements HomeService {
    @Autowired
    private HomeMapper homeMapper;

    //统计学生数量，教师数量，用户数量，正在考试的数量
    @Override
    public Statist getStatistics() {
        Statist statist = new Statist();
        statist.setStudentCount(homeMapper.getStudentCount());
        statist.setTeacherCount(homeMapper.getTeacherCount());
        statist.setExamCount(homeMapper.getExamCount());
        statist.setUserCount(homeMapper.getUserCount());
        return statist;
    }
}
